/**
 * Created by YangYan on 2016/5/24.
 */
(function(){
    function Site() {
        this.name="CodePlayer",
        this.url="http://www.365mini.com/",
        this.sayHello=function(){
            document.writeln("欢迎来到："+this.name)
        }
    };
    var obj={
        engine:"PHP",
        sayHi:function(){
            document.writeln("欢迎来到："+this.url);
        }
    };
    Site.prototype=obj;
    var s=new Site();
    document.writeln(s.hasOwnProperty("name"));
    document.writeln(s.hasOwnProperty("sayHello"));

    document.writeln(s.hasOwnProperty("engine"));
    document.writeln(s.hasOwnProperty("sayHi"));
    document.writeln(s.hasOwnProperty("toString"));

    document.writeln("engine" in s);
    document.writeln("sayHello" in s);
})();